<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="dao.CommDAO"%>
<%@page import="util.Info"%>
<%@page import="util.PageManager"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0028)http://csir461.com/index.jsp -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>机票预订网站</TITLE>
<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">


<STYLE type=text/css>
.STYLE1 {
	COLOR: #d77745
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.6001.19222">
</HEAD>
<BODY>
	<%
 CommDAO dao = new CommDAO();
HashMap amap = (HashMap)session.getAttribute("admin");
String zyuname = request.getParameter("zyuname")==null?"":request.getParameter("zyuname");
if(amap!=null)
{
HashMap zm = dao.select("select * from members where uname='"+zyuname+"'").get(0);
session.setAttribute("user",zm);
}
 %>
	<%
if(Info.getMUser(request)==null&&amap==null){
 %>
	<script type="text/javascript">
 alert("请先登录");
 window.location.replace("index.jsp");
 </script>
	<%} %>

	<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">
	<STYLE type=text/css>
BODY {
	MARGIN: 0px
}

BODY {
	FONT-FAMILY: 宋体
}

TD {
	FONT-FAMILY: 宋体
}

TH {
	FONT-FAMILY: 宋体
}
</STYLE>



	<TABLE class=bk border=0 cellSpacing=0 cellPadding=0 width=950
		align=center>
		<TBODY>
			<TR>
				<TD vAlign=top>

					<LINK rel=stylesheet type=text/css href="npticketsys_files/css.css">



					<jsp:include page="top.jsp"></jsp:include> <%
                 
                  
                  HashMap umap = Info.getMUser(request);
                  HashMap zymap = new HashMap();
                  
                  boolean isself = false;
                  if(amap!=null)
                  {
                   umap = dao.select("select * from members where uname='"+zyuname+"'").get(0); 
                    isself = true; 
                  }else{
                  if(request.getParameter("zyuname")==null||"null".equals(request.getParameter("zyuname"))){
                  %> <script type="text/javascript">
				 alert("请先登录");
				 window.location.replace("index.jsp");
				 </script> <%
                  }
                  else if(request.getParameter("zyuname").equals(umap.get("uname").toString()))
                  {
                    umap = dao.getmap(umap.get("id").toString(),"members");
                  isself = true;
                  }else{
                   umap = dao.select("select * from members where uname='"+zyuname+"'").get(0);  
                  }
                  }
                   %>














					<TABLE border=0 cellSpacing=0 cellPadding=0 width=925 align=center>
						<TBODY>
							<TR>
								<TD vAlign=top>
									<TABLE class=mt border=0 cellSpacing=0 cellPadding=0 width=925>
										<TBODY>
											<TR>
												<TD vAlign=top width=693>
													<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%"
														align=left>
														<TBODY>
															<TR>
																<TD vAlign=top align=middle>

																	<form action="/npticketsys/npticketsys?ac=regedit"
																		name="f1" method="post">
																		<TABLE border=0 cellSpacing=0 cellPadding=0
																			width="96%">
																			<TBODY>
																				<TR>
																					<TD>
																						<TABLE border=0 cellSpacing=0 cellPadding=0
																							width="100%" align=left>
																							<TBODY>
																								<TR>
																									<TD height=24
																										background=npticketsys_files/112bg.gif
																										width=320 align=left>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width=200 align=left>
																											<TBODY>
																												<TR>
																													<TD width=8 align=left>&nbsp;</TD>
																													<TD class=ls height=24 vAlign=bottom
																														width=174 align=left><STRONG>个人基本信息</STRONG></TD>




																												</TR>
																											</TBODY>
																										</TABLE> <%
                                if(isself){
                                 %>
																										<div onClick="upjbxx();" align="right"
																											style="vertical-align: middle; line-height: 27px; cursor: hand">
																											<font color="orange">[更新]</font>
																										</div> <%}else{
                                if(dao.select("select * from friends where uname='"+umap.get("uname").toString()+"' and funame='"+zyuname+"'").size()==0){
                                 %>
																										<div align="right"
																											style="vertical-align: middle; line-height: 27px; cursor: hand">
																											<a
																												href="/npticketsys/npticketsys?ac=friends&uname=<%=umap.get("uname")%>&funame=<%=zyuname %>">
																												<font color="orange">[加为好友]</font>
																											</a>
																										</div> <%}} %> <script type="text/javascript">
                                function upjbxx()
                                {
                                pop("reregedit.jsp","信息修改",500,340);
                                }
                                </script>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																				<TR>
																					<TD>
																						<TABLE class=mt border=0 cellSpacing=0
																							cellPadding=0 width="100%">
																							<TBODY>
																								<TR>
																									<TD align=left vAlign=top>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width="100%">
																											<TBODY>


																												<TR>
																													<TD width="16%" height=30 align=center
																														vAlign=center class=xh>个性签名</TD>
																													<TD height="30" colspan="4" align=left
																														vAlign=center class=xh><%=umap.get("gxqm") %></TD>
																												</TR>



																												<TR>
																													<TD width="16%" height=30 align=center
																														vAlign=center class=xh>用户名</TD>
																													<TD width="26%" height="30" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("uname") %>
																													</label></TD>
																													<TD width="16%" align=center vAlign=center
																														class=xh>性别</TD>
																													<TD width="26%" align=left vAlign=center
																														class=xh><%=umap.get("sex") %></TD>
																													<TD width="16%" rowspan="3" align=center
																														vAlign=center class=xh><img
																														src="upfile/<%=umap.get("filename") %>"
																														height="80" /></TD>
																												</TR>

																												<TR>
																													<TD height=30 align=center vAlign=center
																														class=xh>公开信息</TD>
																													<TD height=30 align=left vAlign=center
																														class=xh><%=umap.get("ispub") %></TD>
																													<TD height=30 align=center vAlign=center
																														class=xh>联系方式</TD>
																													<TD height=30 align=left vAlign=center
																														class=xh><%=umap.get("linkphone") %></TD>
																												</TR>

																												<TR>
																													<TD height=30 align=center vAlign=center
																														class=xh>姓名</TD>
																													<TD height=30 align=left vAlign=center
																														class=xh><%=umap.get("tname") %></TD>
																													<TD height=30 align=center vAlign=center
																														class=xh>身份证号</TD>
																													<TD height=30 align=left vAlign=center
																														class=xh><%=umap.get("sfid") %></TD>
																												</TR>

																												<TR>
																													<TD height=30 align=center vAlign=center
																														class=xh>地址</TD>
																													<TD height=30 colspan="4" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("addrs") %>
																													</label></TD>
																												</TR>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																			</TBODY>
																		</TABLE>




																		<TABLE border=0 cellSpacing=0 cellPadding=0
																			width="96%">
																			<TBODY>
																				<TR>
																					<TD>
																						<TABLE border=0 cellSpacing=0 cellPadding=0
																							width="100%" align=left>
																							<TBODY>
																								<TR>
																									<TD height=24
																										background=npticketsys_files/112bg.gif
																										width=320 align=left>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width=200 align=left>
																											<TBODY>
																												<TR>
																													<TD width=8 align=left>&nbsp;</TD>
																													<TD class=ls height=24 vAlign=bottom
																														width=174 align=left><STRONG>个人健康数据</STRONG></TD>




																												</TR>
																											</TBODY>
																										</TABLE> <%
                                if(isself){
                                 %>
																										<div onClick="upjksj();" align="right"
																											style="vertical-align: middle; line-height: 27px; cursor: hand">
																											<font color="orange">[更新]</font>
																										</div> <%} %> <script type="text/javascript">
                                function upjbxx()
                                {
                                pop("reregedit.jsp","信息修改",500,340);
                                }
                                function upjksj()
                                {
                                pop("jksj.jsp","信息修改",500,310);
                                }
                                </script>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																				<TR>
																					<TD>
																						<TABLE class=mt border=0 cellSpacing=0
																							cellPadding=0 width="100%">
																							<TBODY>
																								<TR>
																									<TD align=left vAlign=top>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width="100%">
																											<TBODY>



																												<TR>
																													<TD width="16%" height=30 align=center
																														vAlign=center class=xh>年龄</TD>
																													<TD width="16%" height="30" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("age") %>
																													</label></TD>
																													<TD width="16%" align=center vAlign=center
																														class=xh>体重</TD>
																													<TD width="16%" align=left vAlign=center
																														class=xh><%=umap.get("tiz") %></TD>
																													<TD width="16%" align=center vAlign=center
																														class=xh>身高</TD>
																													<TD width="16%" align=left vAlign=center
																														class=xh><%=umap.get("sheg") %></TD>
																												</TR>



																												<TR>
																													<TD width="16%" height=45 align=center
																														vAlign=center class=xh>疾病史</TD>
																													<TD height="45" colspan="5" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("jbs") %>
																													</label></TD>
																												</TR>

																												<TR>
																													<TD width="16%" height=45 align=center
																														vAlign=center class=xh>治疗方法</TD>
																													<TD height="45" colspan="5" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("zlff") %>
																													</label></TD>
																												</TR>

																												<TR>
																													<TD width="16%" height=45 align=center
																														vAlign=center class=xh>治疗效果</TD>
																													<TD height="45" colspan="5" align=left
																														vAlign=center class=xh><label>
																															<%=umap.get("zlxg") %>
																													</label></TD>
																												</TR>
																												<%
                                if(isself){
                                 %>
																												<TR>
																													<TD width="16%" height=45 align=center
																														vAlign=center class=xh>信息查询</TD>
																													<TD height="45" colspan="5" align=left
																														vAlign=center class=xh><label>
																															<input name="infotype" type="radio"
																															id="radio" value="用户文章" checked>
																															用户文章 <input type="radio" name="infotype"
																															id="radio2" value="网友"> 网友
																															&nbsp;&nbsp; <input type="text"
																															name="key" id="key"> &nbsp;&nbsp;
																															<input type="button" onClick="searchf();"
																															name="button" id="button" value="查询">

																															<script type="text/javascript">
function searchf()
{
var infotypevalue = "用户文章";
var radios = document.getElementsByName("infotype");
if(radios[0].checked )infotypevalue = "用户文章";
if(radios[1].checked )infotypevalue = "网友";
if(infotypevalue=="用户文章")
{
f1.action="/npticketsys/zlfa.jsp";
f1.submit();
}
if(infotypevalue=="网友")
{
f1.action="/npticketsys/byfx.jsp";
f1.submit();
}
}
</script>

																													</label></TD>
																												</TR>

																												<%} %>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																			</TBODY>
																		</TABLE>









																		<%
                                if(isself){
                                 %>
																		<TABLE border=0 cellSpacing=0 cellPadding=0
																			width="96%">
																			<TBODY>
																				<TR>
																					<TD>
																						<TABLE border=0 cellSpacing=0 cellPadding=0
																							width="100%" align=left>
																							<TBODY>
																								<TR>
																									<TD height=24
																										background=npticketsys_files/112bg.gif
																										width=320 align=left>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width=200 align=left>
																											<TBODY>
																												<TR>
																													<TD width=8 align=left>&nbsp;</TD>
																													<TD class=ls height=24 vAlign=bottom
																														width=174 align=left><STRONG>我的好友</STRONG></TD>




																												</TR>
																											</TBODY>
																										</TABLE> <script type="text/javascript">
                                function upjbxx()
                                {
                                pop("reregedit.jsp","信息修改",500,340);
                                }
                                function upjksj()
                                {
                                pop("jksj.jsp","信息修改",500,310);
                                }
                                </script>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																				<TR>
																					<TD>
																						<TABLE class=mt border=0 cellSpacing=0
																							cellPadding=0 width="100%">
																							<TBODY>
																								<TR>
																									<TD align=left vAlign=top>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width="100%">
																											<TBODY>



																												<TR>
																													<%
                                for(HashMap hym:dao.select("select * from friends where uname='"+umap.get("uname")+"'")){
                                 HashMap m = dao.select("select * from members where uname='"+hym.get("funame")+"'").get(0);
                                 %>
																													<TD height=30 align=center vAlign=center
																														class=xh><a
																														href="grzy.jsp?zyuname=<%=m.get("uname")%>">
																															<img src="upfile/<%=m.get("filename")%>"
																															border="0" height="60" /> <br /> <%=m.get("uname")%>
																													</a></TD>
																													<%} %>
																												</TR>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																			</TBODY>
																		</TABLE>
																		<%} %>





																		<TABLE border=0 cellSpacing=0 cellPadding=0
																			width="96%">
																			<TBODY>
																				<TR>
																					<TD>
																						<TABLE border=0 cellSpacing=0 cellPadding=0
																							width="100%" align=left>
																							<TBODY>
																								<TR>
																									<TD height=24
																										background=npticketsys_files/112bg.gif
																										width=320 align=left>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width=200 align=left>
																											<TBODY>
																												<TR>
																													<TD width=8 align=left>&nbsp;</TD>
																													<TD class=ls height=24 vAlign=bottom
																														width=174 align=left><STRONG>留言信息</STRONG></TD>


																													<%
                                if(request.getParameter("me")!=null)
                                {
                                String content = request.getParameter("content");
                                dao.commOper("insert into messages values(null,'"+umap.get("uname")+"','"+content+"','"+Info.getDateStr()+"','"+request.getParameter("zyuname")+"')");
                                }
                                 %>

																												</TR>
																											</TBODY>
																										</TABLE> <%
                                if(isself){
                                 %>
																										<div onClick="upjbxx();" align="right"
																											style="vertical-align: middle; line-height: 27px; cursor: hand"></div>
																										<%}else{
                                if(dao.select("select * from friends where uname='"+umap.get("uname").toString()+"' and funame='"+zyuname+"'").size()==0){
                                 %>
																										<div align="right"
																											style="vertical-align: middle; line-height: 27px; cursor: hand"></div>
																										<%}} %> <script type="text/javascript">
                                function upjbxx()
                                {
                                pop("reregedit.jsp","信息修改",500,340);
                                }
                                </script>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																				<TR>
																					<TD>
																						<TABLE class=mt border=0 cellSpacing=0
																							cellPadding=0 width="100%">
																							<TBODY>
																								<TR>
																									<TD align=left vAlign=top>
																										<TABLE border=0 cellSpacing=0 cellPadding=0
																											width="100%">
																											<TBODY>

																												<%
                                 for(HashMap m:dao.select("select * from messages where zyuname='"+zyuname+"'")){
                                  %>
																												<TR>
																													<TD height=30 align=left vAlign=center
																														class=xh><%=m.get("author")+" : "+m.get("content")+"("+m.get("savetime")+")" %>
																													</TD>
																												</TR>
																												<%} %>

																												<TR>
																													<TD height=98 colspan="2" align=center
																														vAlign=center class=xh><label>
																															<textarea name="content" id="content"
																																cols="45" rows="3"></textarea> <br />
																														<br /> <input type="button"
																															onclick="msub()" value="提交留言" /> <script
																																type="text/javascript">
                                  function msub()
                                  {
                                  f1.action = "grzy.jsp?zyuname=<%=zyuname%>&me=me";
                                  f1.submit();
                                  }
                                  </script>

																													</label></TD>
																												</TR>
																											</TBODY>
																										</TABLE>
																									</TD>
																								</TR>
																							</TBODY>
																						</TABLE>
																					</TD>
																				</TR>
																			</TBODY>
																		</TABLE>





																	</form>
																</TD>
															</TR>
														</TBODY>
													</TABLE>
												</TD>





												<jsp:include page="left.jsp"></jsp:include>






											</TR>
										</TBODY>
									</TABLE>
								</TD>
							</TR>
						</TBODY>
					</TABLE>
					<TABLE border=0 cellSpacing=0 cellPadding=0 width=950>
						<TBODY>
							<TR>
								<TD>&nbsp;</TD>
							</TR>
						</TBODY>
					</TABLE>
				</TD>
			</TR>
		</TBODY>
	</TABLE>




	<jsp:include page="foot.jsp"></jsp:include>



</BODY>
</HTML>
<script language="javascript">
<%
if(request.getAttribute("error")!=null){
%>
alert("用户名已存在");
<%}%>
<%
if(request.getAttribute("suc")!=null){
%>
alert("添加成功");
<%}%>
</script>
<SCRIPT language=javascript src="/npticketsys/js/popups.js"></SCRIPT>